package com.oreilly.justspring.core.ch2;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyBeanClient {
	private ApplicationContext ctx = null;

	public MyBeanClient() {
		ctx = new ClassPathXmlApplicationContext("ch2-beans.xml");
	}

	public void test() {
		MyBean myBean = (MyBean) ctx.getBean("myBean");
		System.out.println("PropertyOne: "+myBean.getPropertyOne());
	}

	public static void main(String[] args) {
		MyBeanClient client = new MyBeanClient();
		client.test();
	}

}
